using System.Net;
using org.apache.solr.SolrSharp.Indexing;
using org.apache.solr.SolrSharp.Update;

namespace SolrSharp.Adapters {
	public class SolrUpdaterAdapter : ISolrUpdater {
		private readonly SolrUpdater updater;

		public SolrUpdaterAdapter(SolrUpdater updater) {
			this.updater = updater;
		}

		public void PostToIndex(IndexDocument oDoc, bool bCommit) {
			updater.PostToIndex(oDoc, bCommit);
		}

		public void PostToIndex(IndexDocument oDoc) {
			updater.PostToIndex(oDoc);
		}

		public HttpStatusCode Commit() {
			return updater.Commit();
		}

		public HttpStatusCode Optimize() {
			return updater.Optimize();
		}

		public string SOLR_UPDATE {
			get { return updater.SOLR_UPDATE; }
		}
	}
}